package com.boot.mgt.controller.app

import com.boot.core.result.ResultTo
import com.boot.mgt.service.TaHmsPushService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

/**
 * @author kawins
 * createTime 2018-10-23 16:21
 */
@RestController
@RequestMapping("/app/hmsPush")
class TaHmsPushController {

    @Autowired
    private lateinit var taHmsPushService: TaHmsPushService

    @GetMapping("/{msgId}")
    fun sendSuccess(@PathVariable msgId: Int): ResultTo {
        taHmsPushService.sendSuccess(msgId)
        return ResultTo()
    }

    @GetMapping("/msgList/{hmsType}")
    fun msgList(@PathVariable hmsType: Int?, @RequestParam police_number: String?,
                @RequestParam page_index: Int?, @RequestParam page_size: Int?): ResultTo {
        return taHmsPushService.msgList(page_index, page_size, hmsType, police_number)
    }

}